﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AmuTools;

namespace app.Models
{
    [Model(TableName = "Announce", PrimaryKey = "id", Description = "简介")]
    public class Announcement
    {
        public string id { get; set; }

        [Field(Description ="标题")]
        public string title { get; set; }

        [Field(Description = "阅读量")]
        public string readcount { get; set; }

        [Field(Description = "发布时间", Webable = false)]
        public string time { get; set; }

        [Field(Description = "只显示日期的发布时间", Storageable = false)]
        public string date { get { return time.Split(' ')[0]; } }

        [Field(Description = "内容")]
        public string content { get; set; }
    }
}